<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>demo</title>
    <script src="../js/md5.js"></script>
    <script src="../js/sha1.js"></script>
    <script src="../js/base64.js"></script>
</head>
<body>
<script type="text/javascript">
    var b = new Base64();
    var str = b.encode("admin:admin");
    console.log("base64 encode:" + str);
    //解密
    str = b.decode(str);
    console.log("base64 decode:" + str);
    var hash = hex_md5("123dafd");
    console.log(hash);
    var sha = hex_sha1('mima123465');
    console.log(sha);
</script>
</body>
</html>